package netty.transport;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.net.SocketAddress;

public abstract class AbstractChannel implements Channel {

    private static final Logger log = LoggerFactory.getLogger(AbstractChannel.class);

    private final ChannelId id;
    private final Unsafe unsafe;
    private final ChannelPipeline pipeline;

    protected AbstractChannel() {
        id = newId();
        unsafe = newUnsafe();
        pipeline = newChannelPipeline();
    }

    private ChannelPipeline newChannelPipeline() {
        return null;
    }

    private Unsafe newUnsafe() {
        return null;
    }

    private ChannelId newId() {
        return DefaultChannelId.newInstance();
    }

    @Override
    public ChannelId chanelId() {
        log.info("hello:{}", "1");
        return null;
    }

    @Override
    public EventLoop eventLoop() {
        return null;
    }

    @Override
    public ChannelConfig channelConfig() {
        return null;
    }

    @Override
    public boolean isOpen() {
        return false;
    }

    @Override
    public boolean isRegistered() {
        return false;
    }

    @Override
    public boolean isActive() {
        return false;
    }

    @Override
    public SocketAddress localAddress() {
        return null;
    }

    @Override
    public SocketAddress remoteAddress() {
        return null;
    }

    @Override
    public ChannelPipeline pipeline() {
        return null;
    }

    @Override
    public Unsafe unsafe() {
        return null;
    }
}
